package com.calenda.setevent;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;

public class BaseActivity extends FragmentActivity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
	}

	// This could be moved into an abstract BaseActivity
	// class for being re-used by several instances
	protected void setFragment(Fragment fragment, int id) {
//		getSupportFragmentManager().popBackStackImmediate(null,
//				FragmentManager.POP_BACK_STACK_INCLUSIVE);
		FragmentTransaction ft = getSupportFragmentManager().beginTransaction();

		ft.replace(id, fragment);
//		ft.addToBackStack(null);
		ft.commit();
	}
}
